.class public Lroboguice/application/RoboApplication;
.super Landroid/app/Application;
.source "RoboApplication.java"

# interfaces
.implements Lroboguice/inject/InjectorProvider;


# instance fields
.field protected a:Lcom/google/inject/Injector;

.field protected b:Lroboguice/inject/ContextScope;

.field protected c:Lcom/google/inject/Provider;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Lcom/google/inject/Provider",
            "<",
            "Landroid/content/Context;",
            ">;"
        }
    .end annotation
.end field

.field protected d:Lcom/google/inject/Provider;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Lcom/google/inject/Provider",
            "<",
            "Landroid/content/Context;",
            ">;"
        }
    .end annotation
.end field

.field protected e:Lroboguice/inject/ResourceListener;

.field protected f:Lroboguice/inject/ViewListener;

.field protected g:Lroboguice/inject/ExtrasListener;

.field protected h:Lroboguice/inject/PreferenceListener;

.field protected i:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List",
            "<",
            "Lroboguice/inject/StaticTypeListener;",
            ">;"
        }
    .end annotation
.end field

.field protected j:Lroboguice/event/EventManager;


# direct methods
.method public constructor <init>()V
    .locals 0

    .prologue
    .line 53
    invoke-direct {p0}, Landroid/app/Application;-><init>()V

    return-void
.end method


# virtual methods
.method public a()Lcom/google/inject/Injector;
    .locals 1

    .prologue
    .line 80
    iget-object v0, p0, Lroboguice/application/RoboApplication;->a:Lcom/google/inject/Injector;

    if-nez v0, :cond_1

    .line 81
    monitor-enter p0

    .line 82
    :try_start_0
    iget-object v0, p0, Lroboguice/application/RoboApplication;->a:Lcom/google/inject/Injector;

    if-nez v0, :cond_0

    .line 83
    invoke-virtual {p0}, Lroboguice/application/RoboApplication;->b()V

    .line 84
    invoke-virtual {p0}, Lroboguice/application/RoboApplication;->c()Lcom/google/inject/Injector;

    move-result-object v0

    iput-object v0, p0, Lroboguice/application/RoboApplication;->a:Lcom/google/inject/Injector;

    .line 86
    :cond_0
    monitor-exit p0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 88
    :cond_1
    iget-object v0, p0, Lroboguice/application/RoboApplication;->a:Lcom/google/inject/Injector;

    return-object v0

    .line 86
    :catchall_0
    move-exception v0

    :try_start_1
    monitor-exit p0
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    throw v0
.end method

.method protected a(Ljava/util/List;)V
    .locals 0
    .parameter
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/List",
            "<",
            "Lcom/google/inject/Module;",
            ">;)V"
        }
    .end annotation

    .prologue
    .line 167
    return-void
.end method

.method protected b()V
    .locals 3

    .prologue
    .line 100
    new-instance v0, Lroboguice/inject/ContextScope;

    invoke-direct {v0, p0}, Lroboguice/inject/ContextScope;-><init>(Lroboguice/application/RoboApplication;)V

    iput-object v0, p0, Lroboguice/application/RoboApplication;->b:Lroboguice/inject/ContextScope;

    .line 101
    new-instance v0, Lroboguice/application/RoboApplication$1;

    invoke-direct {v0, p0}, Lroboguice/application/RoboApplication$1;-><init>(Lroboguice/application/RoboApplication;)V

    iput-object v0, p0, Lroboguice/application/RoboApplication;->c:Lcom/google/inject/Provider;

    .line 107
    iget-object v0, p0, Lroboguice/application/RoboApplication;->b:Lroboguice/inject/ContextScope;

    const-class v1, Landroid/content/Context;

    invoke-static {v1}, Lcom/google/inject/Key;->get(Ljava/lang/Class;)Lcom/google/inject/Key;

    move-result-object v1

    iget-object v2, p0, Lroboguice/application/RoboApplication;->c:Lcom/google/inject/Provider;

    invoke-virtual {v0, v1, v2}, Lroboguice/inject/ContextScope;->scope(Lcom/google/inject/Key;Lcom/google/inject/Provider;)Lcom/google/inject/Provider;

    move-result-object v0

    iput-object v0, p0, Lroboguice/application/RoboApplication;->d:Lcom/google/inject/Provider;

    .line 108
    new-instance v0, Lroboguice/inject/ResourceListener;

    invoke-direct {v0, p0}, Lroboguice/inject/ResourceListener;-><init>(Landroid/app/Application;)V

    iput-object v0, p0, Lroboguice/application/RoboApplication;->e:Lroboguice/inject/ResourceListener;

    .line 109
    new-instance v0, Lroboguice/inject/ViewListener;

    iget-object v1, p0, Lroboguice/application/RoboApplication;->d:Lcom/google/inject/Provider;

    iget-object v2, p0, Lroboguice/application/RoboApplication;->b:Lroboguice/inject/ContextScope;

    invoke-direct {v0, v1, p0, v2}, Lroboguice/inject/ViewListener;-><init>(Lcom/google/inject/Provider;Landroid/app/Application;Lroboguice/inject/ContextScope;)V

    iput-object v0, p0, Lroboguice/application/RoboApplication;->f:Lroboguice/inject/ViewListener;

    .line 110
    new-instance v0, Lroboguice/inject/ExtrasListener;

    iget-object v1, p0, Lroboguice/application/RoboApplication;->d:Lcom/google/inject/Provider;

    invoke-direct {v0, v1}, Lroboguice/inject/ExtrasListener;-><init>(Lcom/google/inject/Provider;)V

    iput-object v0, p0, Lroboguice/application/RoboApplication;->g:Lroboguice/inject/ExtrasListener;

    .line 111
    invoke-virtual {p0}, Lroboguice/application/RoboApplication;->e()Z

    move-result v0

    if-eqz v0, :cond_1

    new-instance v0, Lroboguice/event/EventManager;

    invoke-direct {v0}, Lroboguice/event/EventManager;-><init>()V

    :goto_0
    iput-object v0, p0, Lroboguice/application/RoboApplication;->j:Lroboguice/event/EventManager;

    .line 113
    invoke-virtual {p0}, Lroboguice/application/RoboApplication;->d()Z

    move-result v0

    if-eqz v0, :cond_0

    .line 114
    new-instance v0, Lroboguice/inject/PreferenceListener;

    iget-object v1, p0, Lroboguice/application/RoboApplication;->d:Lcom/google/inject/Provider;

    iget-object v2, p0, Lroboguice/application/RoboApplication;->b:Lroboguice/inject/ContextScope;

    invoke-direct {v0, v1, p0, v2}, Lroboguice/inject/PreferenceListener;-><init>(Lcom/google/inject/Provider;Landroid/app/Application;Lroboguice/inject/ContextScope;)V

    iput-object v0, p0, Lroboguice/application/RoboApplication;->h:Lroboguice/inject/PreferenceListener;

    .line 117
    :cond_0
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lroboguice/application/RoboApplication;->i:Ljava/util/List;

    .line 118
    iget-object v0, p0, Lroboguice/application/RoboApplication;->i:Ljava/util/List;

    iget-object v1, p0, Lroboguice/application/RoboApplication;->e:Lroboguice/inject/ResourceListener;

    invoke-interface {v0, v1}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 119
    return-void

    .line 111
    :cond_1
    new-instance v0, Lroboguice/event/EventManager$NullEventManager;

    invoke-direct {v0}, Lroboguice/event/EventManager$NullEventManager;-><init>()V

    goto :goto_0
.end method

.method protected c()Lcom/google/inject/Injector;
    .locals 10

    .prologue
    .line 131
    new-instance v9, Ljava/util/ArrayList;

    invoke-direct {v9}, Ljava/util/ArrayList;-><init>()V

    .line 132
    new-instance v0, Lroboguice/config/RoboModule;

    iget-object v1, p0, Lroboguice/application/RoboApplication;->b:Lroboguice/inject/ContextScope;

    iget-object v2, p0, Lroboguice/application/RoboApplication;->c:Lcom/google/inject/Provider;

    iget-object v3, p0, Lroboguice/application/RoboApplication;->d:Lcom/google/inject/Provider;

    iget-object v4, p0, Lroboguice/application/RoboApplication;->e:Lroboguice/inject/ResourceListener;

    iget-object v5, p0, Lroboguice/application/RoboApplication;->f:Lroboguice/inject/ViewListener;

    iget-object v6, p0, Lroboguice/application/RoboApplication;->g:Lroboguice/inject/ExtrasListener;

    iget-object v7, p0, Lroboguice/application/RoboApplication;->h:Lroboguice/inject/PreferenceListener;

    move-object v8, p0

    invoke-direct/range {v0 .. v8}, Lroboguice/config/RoboModule;-><init>(Lroboguice/inject/ContextScope;Lcom/google/inject/Provider;Lcom/google/inject/Provider;Lroboguice/inject/ResourceListener;Lroboguice/inject/ViewListener;Lroboguice/inject/ExtrasListener;Lroboguice/inject/PreferenceListener;Landroid/app/Application;)V

    .line 134
    invoke-virtual {v9, v0}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 137
    new-instance v0, Lroboguice/config/EventManagerModule;

    iget-object v1, p0, Lroboguice/application/RoboApplication;->j:Lroboguice/event/EventManager;

    iget-object v2, p0, Lroboguice/application/RoboApplication;->d:Lcom/google/inject/Provider;

    invoke-direct {v0, v1, v2}, Lroboguice/config/EventManagerModule;-><init>(Lroboguice/event/EventManager;Lcom/google/inject/Provider;)V

    .line 138
    invoke-virtual {v9, v0}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 141
    invoke-virtual {p0, v9}, Lroboguice/application/RoboApplication;->a(Ljava/util/List;)V

    .line 142
    invoke-virtual {v9}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object v1

    :cond_0
    :goto_0
    invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z

    move-result v0

    if-eqz v0, :cond_1

    invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/google/inject/Module;

    .line 143
    instance-of v2, v0, Lroboguice/config/AbstractAndroidModule;

    if-eqz v2, :cond_0

    .line 144
    check-cast v0, Lroboguice/config/AbstractAndroidModule;

    iget-object v2, p0, Lroboguice/application/RoboApplication;->i:Ljava/util/List;

    invoke-virtual {v0, v2}, Lroboguice/config/AbstractAndroidModule;->a(Ljava/util/List;)V

    goto :goto_0

    .line 146
    :cond_1
    sget-object v0, Lcom/google/inject/Stage;->PRODUCTION:Lcom/google/inject/Stage;

    invoke-static {v0, v9}, Lcom/google/inject/Guice;->createInjector(Lcom/google/inject/Stage;Ljava/lang/Iterable;)Lcom/google/inject/Injector;

    move-result-object v0

    return-object v0
.end method

.method protected d()Z
    .locals 1

    .prologue
    .line 177
    const/4 v0, 0x1

    return v0
.end method

.method protected e()Z
    .locals 1

    .prologue
    .line 181
    const/4 v0, 0x1

    return v0
.end method
